﻿using Basic.HrRemoteModel.EmpSignatureFile;
using Basic.HrRemoteModel.EmpSignatureFile.Model;
using Basic.HrRemoteModel.PdfSign;
using Basic.HrRemoteModel.PdfSign.Model;
using Basic.HrService.Interface;
using WeDonekRpc.Client;
using WeDonekRpc.Client.Interface;

namespace Basic.HrService.RpcEvent
{
    internal class EmpSignFileEvent : IRpcApiService
    {
        private readonly IEmpSignatureFileService _Service;

        public EmpSignFileEvent ( IEmpSignatureFileService service )
        {
            this._Service = service;
        }
        public SignResult GenerateSignPdf ( GenerateSignPdf obj )
        {
            return this._Service.PdfSign(obj.EmpId, obj.SignPdf);
        }
        public PagingResult<SignFileDto> QuerySignFile ( QuerySignFile obj )
        {
            return this._Service.Query(obj.EmpId, obj.Query, obj.ToBasicPage());
        }
        public void CheckSignFilePower ( CheckSignFilePower obj )
        {
            this._Service.CheckPwd(obj.SignFileId, obj.EmpId, obj.Pwd);
        }
        public void DropSignFile ( DropSignFile obj )
        {
            this._Service.Drop(obj.Id, obj.EmpId);
        }
        public SignFileItem[] GetSignFileList ( GetSignFileList obj )
        {
            return this._Service.Gets(obj.EmpId);
        }
    }
}
